import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo9_IO {
    public static void main(String[] args)  {
        InputStream inputStream=null;
        try {
            inputStream = new FileInputStream("./test.txt");//隐含了打开文件
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }finally{
            try {
                inputStream.close();//关闭文件
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
